<?php
/**
 * 类名称
 * User: 13651
 * Time: 2025/9/8 16:58
 */

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use DateTimeInterface;

class BaseModel extends Model
{

    /**
     * 自动写入时间
     * @var bool
     */
    public $timestamps = true;

    /**
     * 格式化时间
     *
     * @param DateTimeInterface $date
     * @return string
     */
    protected function serializeDate(DateTimeInterface $date)
    {
        return $date->format('Y-m-d H:i:s');
    }


}